<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0 auto;
        }

        .head {
            height: 200px;
            background-color: bisque;
        }
    </style>
</head>

<body>
    <div class="head"></div>
    <div class="body">
        <button id="search">search</button>
        <button id="submit">submit</button>
    </div>
    <script>

        window.onload = () => {
            const search = document.querySelector("#search");
            const submit = document.querySelector("#submit");
            search.onclick = () => {
                alert("点击了search")
            }
            submit.onclick = () => {
                alert("点击了submit")
            }
        }
    </script>
</body>

</html>